package erros

import (
	"github.com/kataras/golog"
	"sdn-executor/utils/traces"
)

func Recover(name string) {
	if r := recover(); r != nil {
		stackInfo := traces.Stack(2)
		golog.Errorf("%s Recovered from panic. err: %+v, stack traces: %s", name, r, stackInfo)
	}
}
